package org.dxy.domain.event.workstation;

import lombok.Builder;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * @description: 工位进站事件
 * @author: dxy
 * @createTime: 2025/10/13
 */
@Builder
public record WorkstationInEvent(
        /**
         * 工位ID
         */
        Long workstationId,

        /**
         * 工单号
         */
        String workOrderCode,

        /**
         * 产品序列号
         */
        String serialNumber

) implements DomainEvent {

    @Override
    public Long aggregateId() {
        return workstationId;
    }

    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }

    @Override
    public String eventType() {
        return WorkstationEventTypeEnum.STATION_IN.getKey();
    }
}